using System;
using System.Data;
using System.Linq;
using System.Data.Linq;
using System.Linq.Expressions;
using System.Data.Linq.Mapping;
using System.Collections;
using System.Collections.Generic;
using Widgetsphere.Core.DataAccess;

namespace Acme.Sales.Business.LINQ
{
	/// <summary>
	/// This is a helper object for running LINQ queries on the Customer collection.
	/// </summary>
	[Serializable()]
	[Table(Name = "CUSTOMER")]
	public partial class CustomerQuery : IBusinessObjectLINQQuery
	{
		#region Properties
		/// <summary>
		/// (Maps to the 'CUSTOMER.user_id' database field)
		/// </summary>
		[Column(Name = "user_id", DbType = "Int", CanBeNull = false, IsPrimaryKey = true)]
		public virtual int UserId { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.region' database field)
		/// </summary>
		[Column(Name = "region", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string Region { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.postal_code' database field)
		/// </summary>
		[Column(Name = "postal_code", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string PostalCode { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.phone' database field)
		/// </summary>
		[Column(Name = "phone", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string Phone { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.middle_name' database field)
		/// </summary>
		[Column(Name = "middle_name", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string MiddleName { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.last_name' database field)
		/// </summary>
		[Column(Name = "last_name", DbType = "VarChar (50)", CanBeNull = false, IsPrimaryKey = false)]
		public virtual string LastName { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.first_name' database field)
		/// </summary>
		[Column(Name = "first_name", DbType = "VarChar (50)", CanBeNull = false, IsPrimaryKey = false)]
		public virtual string FirstName { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.fax' database field)
		/// </summary>
		[Column(Name = "fax", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string Fax { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.country' database field)
		/// </summary>
		[Column(Name = "country", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string Country { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.city' database field)
		/// </summary>
		[Column(Name = "city", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string City { get; set; }
		/// <summary>
		/// (Maps to the 'CUSTOMER.address' database field)
		/// </summary>
		[Column(Name = "address", DbType = "VarChar (50)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string Address { get; set; }
		/// <summary>
		/// The date of creation
		/// </summary>
		[Column(Name = "created_date", DbType = "DateTime", CanBeNull = true)]
		public virtual DateTime? CreatedDate { get; set; }
		/// <summary>
		/// The name of the creating entity
		/// </summary>
		[Column(Name = "created_by", DbType = "VarChar(100)", CanBeNull = true)]
		public virtual string CreatedBy { get; set; }
		/// <summary>
		/// The date of last modification
		/// </summary>
		[Column(Name = "modified_date", DbType = "DateTime", CanBeNull = true)]
		public virtual DateTime? ModifiedDate { get; set; }
		/// <summary>
		/// The name of the last modifing entity
		/// </summary>
		[Column(Name = "modified_by", DbType = "VarChar(100)", CanBeNull = true)]
		public virtual string ModifiedBy { get; set; }
		/// <summary>
		/// This is an internal field and is not to be used.
		/// </summary>
		[Column(Name = "time_stamp", DbType = "Binary", CanBeNull = false)]
		public virtual byte[] TimeStamp { get; set; }


		#endregion

	}

}
